package com.meilai.project.mapper.business.workbench;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.meilai.project.entity.business.workbench.SaleWeekCustomerTarget;
import com.meilai.project.vo.business.workbench.SaleWeekCustomerTargetVO;
import com.meilai.project.vo.business.workbench.SignatureHistoryVO;
import com.meilai.project.vo.business.workbench.WeekTransactedCustomerDetailVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 * 销售每周预估成交客户表 Mapper 接口
 * </p>
 *
 * @author haiYangXu
 * @since 2022-08-16
 */
@Mapper
public interface SaleWeekCustomerTargetMapper extends BaseMapper<SaleWeekCustomerTarget> {

    /**
     * 查询目标用户
     *
     * @param week_ids 周id集合
     * @param user_id  用户id
     * @return
     */
    List<WeekTransactedCustomerDetailVO> queryUserWeekTargetCustomerByWeekIds(@Param("ids") List<Long> week_ids, @Param("user_id") Long user_id, @Param("type") Integer type, @Param("boss_ids") List<Long> boss_ids);

    List<SignatureHistoryVO> querySignatureHistoryList(@Param("page") Page<SignatureHistoryVO> page, @Param("customer_id") Long customer_id, @Param("begin_date") LocalDate begin_date, @Param("end_date") LocalDate end_date);

    List<SaleWeekCustomerTargetVO> querySaleWeekCustomerTargetVOList(@Param("type") Integer type, @Param("ids") List<Long> week_ids, @Param("user_id") Long user_id, @Param("boss_ids") List<Long> boss_ids);
}
